<?php

	#doc
	#	classname:	WebUser
	#	scope:		PUBLIC
	#
	#/doc
	
	class WebUser extends CWebUser
	{
		#	internal variables
		private	$_model=null;		
		#	Constructor
		function __construct ()
		{
			# code...
		}
		public function getRole ()
		{
			if ( $user= $this->getModel() )	
			{
				return $user->role;
			}
		}
		
		public function getModel()
		{
			if ( !$this->isGuest && $this->_model === null )
			{
				 $this->_model = User::model()->findByPk($this->id, array('select' => 'role'));


			}
			return $this->_model;

		}
		
		
	
	}
	###	

?>